home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / DesktopAnimation.a < prev    next >
Text File  |  1996-05-01  |  9KB  |  272 lines

  1. ;
  2. ;    File:        DesktopAnimation.a
  3. ;
  4. ;    Contains:    Desktop Animation Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 8
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__DESKTOPANIMATION__') = 'UNDEFINED' THEN
  19. __DESKTOPANIMATION__ SET 1
  20.  
  21.     IF &TYPE('__APPEARANCE__') = 'UNDEFINED' THEN
  22.     include 'Appearance.a'
  23.     ENDIF
  24.     IF &TYPE('__CODEFRAGMENTS__') = 'UNDEFINED' THEN
  25.     include 'CodeFragments.a'
  26.     ENDIF
  27.     IF &TYPE('__COLLECTIONS__') = 'UNDEFINED' THEN
  28.     include 'Collections.a'
  29.     ENDIF
  30.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  31.     include 'Dialogs.a'
  32.     ENDIF
  33.     IF &TYPE('__DISPLAYS__') = 'UNDEFINED' THEN
  34.     include 'Displays.a'
  35.     ENDIF
  36.     IF &TYPE('__FILEMANAGERTYPES__') = 'UNDEFINED' THEN
  37.     include 'FileManagerTypes.a'
  38.     ENDIF
  39.     IF &TYPE('__GXTYPES__') = 'UNDEFINED' THEN
  40.     include 'GXTypes.a'
  41.     ENDIF
  42.     IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
  43.     include 'QDOffscreen.a'
  44.     ENDIF
  45.     IF &TYPE('__TEXTOBJECTS__') = 'UNDEFINED' THEN
  46.     include 'TextObjects.a'
  47.     ENDIF
  48.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  49.     include 'Types.a'
  50.     ENDIF
  51.     IF FOR_SYSTEM8_COOPERATIVE THEN
  52. ;  Gestalt selectors to tell if DAM is installed #### Move to Gestalt.i later 
  53.  
  54. gestaltDesktopAnimationMgr        EQU        'danm'
  55. gestaltDesktopAnimationMgrPresent EQU    0                    ; If bit set then DAM is present
  56. ;  Desktop Animation module file resources 
  57.  
  58. kDesktopAnimModuleFileType        EQU        'damm'
  59. kDesktopAnimListRsrcType        EQU        'giz#'
  60. kDesktopAnimListRsrcVers        EQU        0
  61. kDesktopAnimListRsrcID            EQU        128
  62. kDesktopAnimFirstRsrcID            EQU        8192
  63. kDesktopAnimLastRsrcID            EQU        16383
  64. ;  Properties relating to the DesktopAnimPanel 
  65.  
  66. kDesktopAnimPanelPropertyTag    EQU        'ptag'
  67. kDesktopAnimPanelUndoTextTag    EQU        'utxt'
  68. kDesktopAnimPanelValueToggleTag    EQU        'vtog'
  69. ;  Desktop Animation info values 
  70.  
  71. kDesktopAnimModuleInfoVers        EQU        0
  72. kDesktopAnimModuleInfoShareAny    EQU        0
  73. ;  DesktopAnimFlags 
  74.  
  75. kDesktopAnimDesktop                EQU        $00000001
  76. kDesktopAnimBackground            EQU        $00000002            ; No drawing behind this module
  77. kDesktopAnimScreenSaver            EQU        $00000004
  78. kDesktopAnimCanShareWindow        EQU        $00000008
  79. kDesktopAnimAllDisplays            EQU        $00000010
  80. kDesktopAnimIsSharingWindow        EQU        $00000020            ; If called as part of multiple modules
  81. kDesktopAnimUnfadeOnKeyboard    EQU        $00000040            ; ScreenSaver only
  82. kDesktopAnimUnfadeOnMouseMotion    EQU        $00000080            ; ScreenSaver only
  83. kDesktopAnimOwnsColorPalette    EQU        $00000100            ; ScreenSaver only
  84. kDesktopAnimRequestTerminate    EQU        $00000200            ; ScreenSaver output only
  85. kDesktopAnimDrawingOffscreen    EQU        $00000400            ; Should be set when asking a module to draw to an offscreen
  86.                                                             ; Flags that indicate what mode we are running in
  87. kDesktopAnimModeFlags            EQU        $00000007            ; Flags we determine at runtime when initializing/running a module
  88. kDesktopAnimRuntimeFlags        EQU        $00000737
  89. ; typedef UInt32                         DesktopAnimFlags
  90.  
  91. ;  Pre-defined Desktop Animation property tags 
  92.  
  93. kDesktopAnimDisplayRgnTag        EQU        'drgn'
  94. kDesktopAnimDisplayDepthTag        EQU        'dpth'
  95. ;  Error codes (will be moved to Error.i when we have an assigned range) 
  96.  
  97. kDesktopAnimModuleNotFoundErr    EQU        -3000
  98. kDesktopAnimServerNotFoundErr    EQU        -3001
  99. kDesktopAnimDrawNotFoundErr        EQU        -3002
  100. kDesktopAnimPanelNotFoundErr    EQU        -3003
  101. kDesktopAnimDrawInitErr            EQU        -3004
  102. kDesktopAnimDrawPanelErr        EQU        -3005
  103. kDesktopAnimBadScreenSaverErr    EQU        -3006
  104. kDesktopAnimScreenSaverInternalErr EQU    -3007
  105. kDesktopAnimItemNotModuleErr    EQU        -3008
  106. kDesktopAnimNoQuickdrawGXErr    EQU        -3009
  107. kDesktopAnimBadDesktopAnimModuleDescRefErr EQU -3010
  108. kDesktopAnimUnknownModuleListVersErr EQU -3011
  109. kDesktopAnimUnknownModuleInfoVersErr EQU -3012
  110. kDesktopAnimUnknownPatternListVersErr EQU -3013
  111. kDesktopAnimIllegalDesktopAnimationStatusErr EQU -3014
  112. kDesktopAnimModuleNameTooLongErr EQU    -3015
  113. kDesktopAnimOffscreenLockPixelsErr EQU    -3016
  114. kDesktopAnimQuickdrawGXErr        EQU        -3017
  115. ;  Desktop Pattern Support 
  116.  
  117. kDesktopPatternListRsrcType        EQU        'dtp#'
  118. kDesktopPatternListRsrcVers        EQU        0
  119. kDesktopPatternListRsrcID        EQU        128
  120. ;  Reasons Screen Saver wants to unfade 
  121.  
  122. kScreenSaverUnfadeUnknown        EQU        0
  123. kScreenSaverUnfadeKeyboard        EQU        1
  124. kScreenSaverUnfadeMouseMotion    EQU        2
  125. kScreenSaverUnfadeByRequest        EQU        3
  126. kScreenSaverUnfadeSelfRequest    EQU        4
  127. ; typedef SInt32                         ScreenSaverUnfadeType
  128.  
  129. ;  The drawing surfaces record 
  130. DesktopAnimGraphicsPorts RECORD 0
  131. drawPort                 ds.l    1                ; offset: $0 (0)
  132. gxDrawPort                 ds.l    1                ; offset: $4 (4)
  133. sizeof                     EQU *                    ; size:   $8 (8)
  134.                         ENDR
  135. ;  Offscreen drawing record 
  136. DesktopAnimOffscreenGraphicsPorts RECORD 0
  137. offGWorld                 ds.l    1                ; offset: $0 (0)
  138. offGXDrawPort             ds.l    1                ; offset: $4 (4)
  139. offGXViewDevice             ds.l    1                ; offset: $8 (8)
  140. offGXViewGroup             ds.l    1                ; offset: $C (12)
  141. sizeof                     EQU *                    ; size:   $10 (16)
  142.                         ENDR
  143. ;  Info record for modules when created/opened 
  144. DesktopAnimModuleInfo    RECORD 0
  145. version                     ds.l    1                ; offset: $0 (0)
  146. moduleFlags                 ds.l    1                ; offset: $4 (4)
  147. shareWithSignature         ds.l    1                ; offset: $8 (8)
  148. sizeof                     EQU *                    ; size:   $C (12)
  149.                         ENDR
  150. ;  Info record for Desktop Animation list resource (kDesktopAnimListRsrcType) 
  151. DesktopAnimModuleListInfo RECORD 0
  152. itemListID                 ds.w    1                ; offset: $0 (0)
  153. textObjectListID         ds.w    1                ; offset: $2 (2)
  154. byLineIndex                 ds.w    1                ; offset: $4 (4)
  155. moduleNameIndex             ds.w    1                ; offset: $6 (6)
  156. moduleInfo                 ds        DesktopAnimModuleInfo ; offset: $8 (8)
  157. desktopAnimPanelHandler     ds        Str63            ; offset: $14 (20)
  158. desktopAnimDrawHandler     ds        Str63            ; offset: $54 (84)
  159. sizeof                     EQU *                    ; size:   $94 (148)
  160.                         ENDR
  161. ;  The Desktop Animation list resource (kDesktopAnimListRsrcType) 
  162. DesktopAnimModuleListRsrcRec RECORD 0
  163. version                     ds.l    1                ; offset: $0 (0)
  164. desktopAnimServerHandler  ds    Str63            ; offset: $4 (4)
  165. modulesCnt                 ds.l    1                ; offset: $44 (68)
  166. modules                     ds        DesktopAnimModuleListInfo ; offset: $48 (72) <-- really an array of length one
  167. sizeof                     EQU *                    ; size:   $DC (220)
  168.                         ENDR
  169. ; typedef struct DesktopAnimModuleListRsrcRec * DesktopAnimModuleListRsrcPtr
  170.  
  171. ; typedef DesktopAnimModuleListRsrcPtr * DesktopAnimModuleListRsrcHandle
  172.  
  173. ;  Desktop Pattern Record 
  174. DesktopPattern            RECORD 0
  175. ppatRsrcID                 ds.w    1                ; offset: $0 (0)
  176. nameListID                 ds.w    1                ; offset: $2 (2)
  177. nameListIndex             ds.w    1                ; offset: $4 (4)
  178. sizeof                     EQU *                    ; size:   $6 (6)
  179.                         ENDR
  180. ;  Desktop Pattern List resource (kDesktopPatternListRsrcType) 
  181. DesktopPatternListRsrcRec RECORD 0
  182. version                     ds.w    1                ; offset: $0 (0)
  183. pattCnt                     ds.w    1                ; offset: $2 (2)
  184. patterns                 ds        DesktopPattern ; offset: $4 (4) <-- really an array of length one
  185. sizeof                     EQU *                    ; size:   $A (10)
  186.                         ENDR
  187. ; typedef struct DesktopPatternListRsrcRec * DesktopPatternListRsrcPtr
  188.  
  189. ; typedef DesktopPatternListRsrcPtr *    DesktopPatternListRsrcHandle
  190.  
  191.     ENDIF
  192.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  193. ;  Desktop Animation Module type 
  194.  
  195. kItemIsBackground                EQU        $0001
  196. kItemIsModule                    EQU        $0002
  197. kItemIsPattern                    EQU        $0003
  198. kItemIsNoModule                    EQU        $0004                ; Used internally
  199. ; typedef SInt16                         DesktopAnimItemType
  200.  
  201. ;  Desktop Animation status 
  202.  
  203. kDesktopAnimationTurnedOn        EQU        $00000001            ; Desktop animation is on
  204. kScreenSaverTurnedOn            EQU        $00000002            ; Screen saving is turned on
  205. kScreenSaverAsleep                EQU        $00000004            ; Currently in screen saving mode
  206. kScreenSaverDemoMode            EQU        $00000008            ; Screen saving demo mode (read only)
  207. ; typedef UInt32                         DesktopAnimationStatusType
  208.  
  209. ;  Module description reference 
  210.  
  211.  
  212. ;  Desktop Animation Manager API 
  213. ;
  214. ; extern OSStatus GetDesktopAnimationDesktopPatternsFileRef(FSObjectRef *pattFileRef)
  215. ;
  216.     IF GENERATINGCFM THEN
  217.         IMPORT_CFM_FUNCTION GetDesktopAnimationDesktopPatternsFileRef
  218.     ENDIF
  219.  
  220. ;
  221. ; extern void GetDesktopAnimationStatus(DesktopAnimationStatusType *status)
  222. ;
  223.     IF GENERATINGCFM THEN
  224.         IMPORT_CFM_FUNCTION GetDesktopAnimationStatus
  225.     ENDIF
  226.  
  227. ;
  228. ; extern OSStatus SetDesktopAnimationStatus(DesktopAnimationStatusType status)
  229. ;
  230.     IF GENERATINGCFM THEN
  231.         IMPORT_CFM_FUNCTION SetDesktopAnimationStatus
  232.     ENDIF
  233.  
  234. ;
  235. ; extern OSStatus NewDesktopAnimationModuleDescRef(TextObject itemName, FSObjectRef itemFile, SInt32 itemID, DesktopAnimItemType itemType, DesktopAnimModuleDescRef *moduleDescRef)
  236. ;
  237.     IF GENERATINGCFM THEN
  238.         IMPORT_CFM_FUNCTION NewDesktopAnimationModuleDescRef
  239.     ENDIF
  240.  
  241. ;
  242. ; extern OSStatus CloneDesktopAnimationModuleDescRef(DesktopAnimModuleDescRef moduleDescRef)
  243. ;
  244.     IF GENERATINGCFM THEN
  245.         IMPORT_CFM_FUNCTION CloneDesktopAnimationModuleDescRef
  246.     ENDIF
  247.  
  248. ;
  249. ; extern Boolean EquivalentDesktopAnimationModuleDescRefs(DesktopAnimModuleDescRef moduleADescRef, DesktopAnimModuleDescRef moduleBDescRef)
  250. ;
  251.     IF GENERATINGCFM THEN
  252.         IMPORT_CFM_FUNCTION EquivalentDesktopAnimationModuleDescRefs
  253.     ENDIF
  254.  
  255. ;
  256. ; extern OSStatus GetDesktopAnimationModuleDescInfo(DesktopAnimModuleDescRef moduleDescRef, TextObject itemName, FSObjectRef *itemFile, SInt32 *itemID, DesktopAnimItemType *itemType)
  257. ;
  258.     IF GENERATINGCFM THEN
  259.         IMPORT_CFM_FUNCTION GetDesktopAnimationModuleDescInfo
  260.     ENDIF
  261.  
  262. ;
  263. ; extern OSStatus DisposeDesktopAnimModuleDescRef(DesktopAnimModuleDescRef moduleDescRef)
  264. ;
  265.     IF GENERATINGCFM THEN
  266.         IMPORT_CFM_FUNCTION DisposeDesktopAnimModuleDescRef
  267.     ENDIF
  268.  
  269.     ENDIF
  270.     ENDIF ; __DESKTOPANIMATION__ 
  271.  
  272.